package chenji.yourinventory.inventory;

import java.util.HashMap;

import org.bukkit.entity.Player;

public class InventoryManager {
	HashMap<Player, InventoryManagerType> record = new HashMap<>();

	public enum InventoryManagerType {
		MENU, PLAYERMENUEDITOR, MANAGERMENUEDITOR, ITEMEDITOR, UNTL;
	}

	public void openInventory(Player p, InventoryManagerType type) {
		this.record.put(p, type);
	}

	public boolean isOpened(Player p) {
		return this.record.containsKey(p);
	}

	public void onDisable() {
		for (Player p : this.record.keySet()) {
			p.closeInventory();
		}
	}

}
